<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>AGS Tween Module 1.1 Help</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<style type="text/css">
body, div, ul, li, pre { margin: 0; padding: 0; }
body {
	font: 10pt Verdana, Helvetica, Arial, sans-serif;
	color: #000;
	background: #FFFFE1;
	width: 100%; height: 100%;
}
h2 { margin: 2em 0 1em; }
pre { background: #fff; padding: 1em; border: 1px dashed #999; overflow: auto; }
hr { border: 1px solid #999; margin: 2em 0; }
ul { padding-left: 1.5em; }
h4 { margin-bottom: 0.2em; }
#container { width: 100%; height: 100%; position: absolute; }
#nav {
	width: 16.5em; height: 100%; padding: 0 .5em;
	position: fixed; overflow: auto;  top: 0; left: 0;
	background: white; border-right: 1px solid #CCC;
}
#content { margin-left: 17.5em; padding: 0 .5em; overflow: auto; height: 100%; }
#content p { width: 42em; }
#content h4 { font-weight: normal; margin-bottom: 0.2em; font-size: 0.9em; color: #f00; }
</style>	
</head>

<body>
<div id="container">

<div id="nav">
<h4>General</h4>
<ul>
	<li><a href="#about">About</a></li>
	<li><a href="#license">License</a></li>
</ul>

<h4>Enumerated types</h4>
<ul>
	<li><a href="#TweenTiming">TweenTiming</a></li>
	<li><a href="#TweenStyle">TweenStyle</a></li>
</ul>

<h4>Functions</h4>
<ul>
	<li><a href="#SecondsToLoops">SecondsToLoops</a></li>
	<li><a href="#StopAllTweens">StopAllTweens</a></li>
	<li><a href="#TweenPosition">TweenPosition</a></li>
	<li><a href="#TweenScaling">TweenScaling</a></li>
	<li><a href="#TweenSize">TweenSize</a></li>
	<li><a href="#TweenStopAll">TweenStopAll</a></li>
	<li><a href="#TweenTransparency">TweenTransparency</a></li>
	<li><a href="#TweenViewportX">TweenViewportX</a></li>
	<li><a href="#TweenViewportY">TweenViewportY</a></li>
	<li><a href="#TweenViewportXY">TweenViewportXY</a></li>
	<li><a href="#TweenGamma">TweenGamma</a></li>
	<li><a href="#TweenShakeScreen">TweenShakeScreen</a></li>
	<li><a href="#TweenMusicMasterVolume">TweenMusicMasterVolume</a></li>
	<li><a href="#TweenDigitalMasterVolume">TweenDigitalMasterVolume</a></li>
	<li><a href="#TweenChannelVolume">TweenChannelVolume</a></li>
	<li><a href="#TweenSpeechVolume">TweenSpeechVolume</a></li>
	<li><a href="#TweenSoundVolume">TweenSoundVolume</a></li>
	<li><a href="#TweenAreaScaling">TweenAreaScaling</a></li>
	<li><a href="#TweenZOrder">TweenZOrder</a></li>
	<li><a href="#TweenImage">TweenImage</a></li>
	<li><a href="#TweenAnimationSpeed">TweenAnimationSpeed</a></li>
	<li><a href="#TweenLightLevel">TweenLightLevel</a></li>
	<li><a href="#TweenTintR">TweenTintR</a></li>
	<li><a href="#TweenTintG">TweenTintG</a></li>
	<li><a href="#TweenTintB">TweenTintB</a></li>
	<li><a href="#TweenTintAmount">TweenTintAmount</a></li>
	<li><a href="#TweenTintBlackAndWhite">TweenTintBlackAndWhite</a></li>
	<li><a href="#TweenColorR">TweenColorR</a></li>
	<li><a href="#TweenColorG">TweenColorG</a></li>
	<li><a href="#TweenColorB">TweenColorB</a></li>
	<li><a href="#TweenValue">TweenValue</a></li>
	<li><a href="#TweenHandleOffset">TweenHandleOffset</a></li>
	<li><a href="#TweenSelectedItem">TweenSelectedItem</a></li>
	<li><a href="#TweenTopItem">TweenTopItem</a></li>
</ul>

</div>

<div id="content">

<h1><a name="about"></a>Tween Module</h1>
<p>For <a href="http://www.adventuregamestudio.co.uk/">Adventure Game Studio</a></p>
<p>Version 1.1</p>
<p>Created by Edmundo Ruiz (edmundo@edmundito.com)<br/>
Additional scripting by Tzach Shabtay</p>

<p>This module can be used to create programatic animations.
It supports most of the ags systems. It allows these
effects to be  blocking, non blocking, or loop them, and it has
acceleration/deceleration timing functions.</p>

<p>Note that the script syntax differs a bit between AGS 3.x and AGS 2.x,
which will be noted in this documentation. You can also make the AGS 2.x syntax also available in AGS 3.x by
commenting out line 102 in the module script header, in case that you are porting your game to AGS 3.x and
have written functions using Tween.</p>

<h2><a name="license"></a>License</h2>

<p>This module is distributed with the very liberal <a href="http://www.opensource.org/licenses/mit-license.php">MIT License</a>.</p>

<p>That said, you are most welcome but not obliged to give us credit in your game as:</p>

<p>
<strong>Special Thanks</strong><br/>
Edmundo Ruiz<br/>
Tzach Shabtay
</p>

<p>And in the AGS Games database:</p>
<p>
netmonkey Tween Module<br/>
tzachs Tween Module
</p>

<h2>Enumerated types</h2>

<h3><a name="TweenTiming">TweenTiming</a></h3>
<pre>
enum TweenTiming {
  eLinearTween,
  eEaseInTween,
  eEaseOutTween, 
  eEaseInEaseOutTween
};
</pre>

<p>Used to set the timing of the tween, whether it's just a linear interpolation,
one that only accelerates when it starts, one that only decelerates when it ends,
or both accelerates at start and decelerates at end.</p>

<hr />

<h3><a name="TweenStyle">TweenStyle</a></h3>
<pre>
enum TweenStyle {
  eBlockTween, 
  eNoBlockTween, 
  eRepeatTween, 
  eReverseRepeatTween,
};
</pre>
<p>Used to set the style of the tween, whether is blocking, non-blocking, repeating,
or repeating reverse (where at the end of the tween cycle and repeats, it reverses
the direction of the tween).</p>

<hr />

<h2>Functions</h2>

<h3><a name="SecondsToLoops">SecondsToLoops</a></h3>
<pre>
// AGS 3.x and 2.x
SecondsToLoops(float seconds);
</pre>
<p>Converts and returns the number of seconds into game loops.</p>
<h4>Example:</h4>
<pre>
Wait(SecondsToLoops(5.0));
</pre>
<p>Will wait for 5 seconds.</p>

<hr />

<h3><a name="StopAllTweens">StopAllTweens</a></h3>
<pre>
// AGS 3.x
Character.StopAllTweens()
GUI.StopAllTweens()
Object.StopAllTweens()
Label.StopAllTweens()
Button.StopAllTweens()
TextBox.StopAllTweens()
ListBox.StopAllTweens()
Slider.StopAllTweens()
InvWindow.StopAllTweens()

// AGS 2.x
TweenStopAllForCharacter(Character* character)
TweenStopAllForGUI(GUI* gui)
TweenStopAllForObject(Object* object)
TweenStopAllForLabel(Label* label)
TweenStopAllForButton(Button* button)
TweenStopAllForTextBox(TextBox* textBox)
TweenStopAllForListBox(ListBox* listBox)
TweenStopAllForSlider(Slider* slider)
TweenStopAllForInvWindow(InvWindow* invWindow)
</pre>
<p>Stops all the Tweens currently playing on the a character, GUI, room object, etc.</p>
<h4>Example:</h4>
<pre>
// AGS 3.x
cEgo.StopAllTweens();
gIconbar.StopAllTweens();
oBluecup.StopAllTweens();

// AGS 2.x
TweenStopAllForCharacter(cEgo);
TweenStopAllForGUI(gIconbar);
TweenStopAllForObject(oBluecup);
</pre>
<p>Will stop all the tweens for cEgo, cIconbar, and oBluecup.</p>
<p><em>See Also</em>: <strong><a href="#TweenStopAll">TweenStopAll</a></strong></p>

<hr />

<h3><a name="TweenPosition">TweenPosition</a></h3>
<pre>
// AGS 3.x
Character.TweenPosition(float timeInSeconds, short toX, short toY, TweenTiming timing=eLinearTween, TweenStyle style=eBlockTween)
GUI.TweenPosition(float timeInSeconds, short toX, short toY, TweenTiming timing=eLinearTween, TweenStyle style=eNoBlockTween)
Object.TweenPosition(float timeInSeconds, short toX, short toY, TweenTiming timing=eLinearTween, TweenStyle style=eBlockTween)
Label.TweenPosition(float timeInSeconds, short toX, short toY, TweenTiming timing=eLinearTween, TweenStyle style=eBlockTween)
Button.TweenPosition(float timeInSeconds, short toX, short toY, TweenTiming timing=eLinearTween, TweenStyle style=eBlockTween)
TextBox.TweenPosition(float timeInSeconds, short toX, short toY, TweenTiming timing=eLinearTween, TweenStyle style=eBlockTween)
ListBox.TweenPosition(float timeInSeconds, short toX, short toY, TweenTiming timing=eLinearTween, TweenStyle style=eBlockTween)
Slider.TweenPosition(float timeInSeconds, short toX, short toY, TweenTiming timing=eLinearTween, TweenStyle style=eBlockTween)
InvWindow.TweenPosition(float timeInSeconds, short toX, short toY, TweenTiming timing=eLinearTween, TweenStyle style=eBlockTween)

// AGS 2.x
TweenCharacterPosition(Character* character, float timeInSeconds, short toX, short toY, TweenTiming timing=eLinearTween, TweenStyle style=eBlockTween)
TweenGUIPosition(GUI* gui, float timeInSeconds, short toX, short toY, TweenTiming timing=eLinearTween, TweenStyle style=eNoBlockTween)
TweenObjectPosition(Object* object, float timeInSeconds, short toX, short toY, TweenTiming timing=eLinearTween, TweenStyle style=eBlockTween)
TweenLabelPosition(Label* label, float timeInSeconds, short toX, short toY, TweenTiming timing=eLinearTween, TweenStyle style=eNoBlockTween)
TweenButtonPosition(Button* button, float timeInSeconds, short toX, short toY, TweenTiming timing=eLinearTween, TweenStyle style=eNoBlockTween)
TweenTextBoxPosition(TextBox* textBox, float timeInSeconds, short toX, short toY, TweenTiming timing=eLinearTween, TweenStyle style=eNoBlockTween)
TweenListBoxPosition(ListBox* listBox, float timeInSeconds, short toX, short toY, TweenTiming timing=eLinearTween, TweenStyle style=eNoBlockTween)
TweenSliderPosition(Slider* slider, float timeInSeconds, short toX, short toY, TweenTiming timing=eLinearTween, TweenStyle style=eNoBlockTween)
TweenInvWindowPosition(InvWindow* invWindow, float timeInSeconds, short toX, short toY, TweenTiming timing=eLinearTween, TweenStyle style=eNoBlockTween)
</pre>
<p>Tweens the position of a character, GUI, object, etc. from its current position to another. Note that by default, GUI tweens are non-blocking unlike the character and object tweens.</p>
<p>Returns the tween duration (in loops) if the TweenStyle is non-blocking (eNoBlockTween). For a repeat TweenStyle (eRepeatTween or eRepeatReverseTween) it returns the duration of one tween cycle. For blocking tweens, it returns a 1.</p>
<h4>Example:</h4>
<pre>
// AGS 3.x
cEgo.TweenPosition(2.5, 100, 100);

// AGS 2.x
TweenCharacterPosition(cEgo, 2.5, 100, 100);
</pre>
<p>Will tween the position of the character from its current position to x 100, y 100 in 2.5 seconds.</p>

<hr />

<h3><a name="TweenScaling">TweenScaling</a></h3>
<pre>
// AGS 3.x
Character.TweenScaling(float timeInSeconds, short toScale, TweenTiming timing=eLinearTween, TweenStyle style=eBlockTween)

// AGS 2.x
TweenCharacterScaling(Character* character, float timeInSeconds, short toScale, TweenTiming timing=eLinearTween, TweenStyle style=eBlockTween)
</pre>
<p>Tweens the scaling of a character.</p>
<p>Returns the tween duration (in loops) if the TweenStyle is non-blocking (eNoBlockTween). For a repeat TweenStyle (eRepeatTween or eRepeatReverseTween) it returns the duration of one tween cycle. For blocking tweens, it returns a 1.</p>
<h4>Example:</h4>
<pre>
// AGS 3.x
cEgo.TweenScaling(1.5, 200);

// AGS 2.x
TweenCharacterScaling(cEgo, 1.5, 200);
</pre>
<p>Will tween the scaling of Ego from its current scale to 200% in 1.5 seconds.</p>

<hr />

<h3><a name="TweenSize">TweenSize</a></h3>
<pre>
// AGS 3.x
GUI.TweenSize(float timeInSeconds, short toWidth, short toHeight, TweenTiming timing=eLinearTween, TweenStyle style=eNoBlockTween)
Label.TweenSize(float timeInSeconds, short toWidth, short toHeight, TweenTiming timing=eLinearTween, TweenStyle style=eNoBlockTween)
Button.TweenSize(float timeInSeconds, short toWidth, short toHeight, TweenTiming timing=eLinearTween, TweenStyle style=eNoBlockTween)
TextBox.TweenSize(float timeInSeconds, short toWidth, short toHeight, TweenTiming timing=eLinearTween, TweenStyle style=eNoBlockTween)
ListBox.TweenSize(float timeInSeconds, short toWidth, short toHeight, TweenTiming timing=eLinearTween, TweenStyle style=eNoBlockTween)
Slider.TweenSize(float timeInSeconds, short toWidth, short toHeight, TweenTiming timing=eLinearTween, TweenStyle style=eNoBlockTween)
InvWindow.TweenSize(float timeInSeconds, short toWidth, short toHeight, TweenTiming timing=eLinearTween, TweenStyle style=eNoBlockTween)

// AGS 2.x
TweenGUISize(GUI* gui, float timeInSeconds, short toWidth, short toHeight, TweenTiming timing=eLinearTween, TweenStyle style=eNoBlockTween)
TweenLabelSize(Label* label, float timeInSeconds, short toWidth, short toHeight, TweenTiming timing=eLinearTween, TweenStyle style=eNoBlockTween)
TweenButtonSize(Button* button, float timeInSeconds, short toWidth, short toHeight, TweenTiming timing=eLinearTween, TweenStyle style=eNoBlockTween)
TweenTextBoxSize(TextBox* textBox, float timeInSeconds, short toWidth, short toHeight, TweenTiming timing=eLinearTween, TweenStyle style=eNoBlockTween)
TweenListBoxSize(ListBox* listBox, float timeInSeconds, short toWidth, short toHeight, TweenTiming timing=eLinearTween, TweenStyle style=eNoBlockTween)
TweenSliderSize(Slider* slider, float timeInSeconds, short toWidth, short toHeight, TweenTiming timing=eLinearTween, TweenStyle style=eNoBlockTween)
TweenInvWindowSize(InvWindow* invWindow, float timeInSeconds, short toWidth, short toHeight, TweenTiming timing=eLinearTween, TweenStyle style=eNoBlockTween)
</pre>
<p>Tweens the size of a GUI, Label, Button etc.</p>
<p>Returns the tween duration (in loops) if the TweenStyle is non-blocking (eNoBlockTween). For a repeat TweenStyle (eRepeatTween or eRepeatReverseTween) it returns the duration of one tween cycle. For blocking tweens, it returns a 1.</p>
<h4>Example:</h4>
<pre>
// AGS 3.x
gStatusline.TweenSize(1.0, 50, 50);

// AGS 2.x
TweenGUISize(gStatusline, 1.0, 50, 50);
</pre>
<p>Will tween the size the statusline GUI from its current size to 50x50 pixels in 1 second.</p>

<hr />

<h3><a name="TweenStopAll">TweenStopAll</a></h3>
<pre>
// AGS 3.x and 2.x
TweenStopAll()
</pre>
<p>Stops all tweens currently playing.</p>
<h4>Example:</h4>
<pre>
TweenStopAll();
</pre>
<p>Will stop whatever tweens where currently playing, whether it was a GUI, character, or room object tween.</p>

<hr />

<h3><a name="TweenTransparency">TweenTransparency</a></h3>
<pre>
// AGS 3.x
Character.TweenTransparency(float timeInSeconds, short toTransparency, TweenTiming timing=eLinearTween, TweenStyle style=eBlockTween)
GUI.TweenTransparency(float timeInSeconds, short toTransparency, TweenTiming timing=eLinearTween, TweenStyle style=eNoBlockTween)
Object.TweenTransparency(float timeInSeconds, short toTransparency, TweenTiming timing=eLinearTween, TweenStyle style=eBlockTween)

// AGS 2.x
TweenCharacterTransparency(Character* character, float timeInSeconds, short toTransparency, TweenTiming timing=eLinearTween, TweenStyle style=eBlockTween)
TweenGUITransparency(GUI* gui, float timeInSeconds, short toTransparency, TweenTiming timing=eLinearTween, TweenStyle style=eNoBlockTween)
TweenObjectTransparency(Object* object, float timeInSeconds, short toTransparency, TweenTiming timing=eLinearTween, TweenStyle style=eBlockTween)
</pre>
<p>Tweens the transparency of a character, GUI, or object from its current transparecy to another. Note that by default, GUI tweens are non-blocking unlike the character and object tweens.</p>
<p>Returns the tween duration (in loops) if the TweenStyle is non-blocking (eNoBlockTween). For a repeat TweenStyle (eRepeatTween or eRepeatReverseTween) it returns the duration of one tween cycle. For blocking tweens, it returns a 1.</p>
<h4>Example:</h4>
<pre>
// AGS 3.x
oBluecup.TweenTransparency(3.0, 100);

// AGS 2.x
TweenObjectTransparency(oBluecup, 3.0, 100);
</pre>
<p>Will tween the transparency of the room object Bluecup to from its current value to 100% (thus fading it out).</p>

<hr />

<h3><a name="TweenViewportX">TweenViewportX</a></h3>
<pre>
// AGS 3.x and 2.x
TweenViewportX(float timeInSeconds, short toX, TweenTiming timing=eLinearTween,  TweenStyle style=eBlockTween);
</pre>
<p>Tweens the location of the viewport on the x axis from its current location to another.</p>
<h4>Example:</h4>
<pre>
TweenViewportX(3.0, 100);
</pre>
<p>Will tween the location of the viewport on the x axis from its current location to 100.</p>

<hr />

<h3><a name="TweenViewportY">TweenViewportY</a></h3>
<pre>
// AGS 3.x and 2.x
TweenViewportY(float timeInSeconds, short toY, TweenTiming timing=eLinearTween,  TweenStyle style=eBlockTween);
</pre>
<p>Tweens the location of the viewport on the y axis from its current location to another.</p>
<h4>Example:</h4>
<pre>
TweenViewportY(3.0, 100);
</pre>
<p>Will tween the location of the viewport on the y axis from its current location to 100.</p>

<hr />

<h3><a name="TweenViewportXY">TweenViewportXY</a></h3>
<pre>
// AGS 3.x and 2.x
TweenViewportX(float timeInSeconds, short toX, short toY, TweenTiming timing=eLinearTween,  TweenStyle style=eBlockTween);
</pre>
<p>Tweens the location of the viewport on the x axis and on the y axis from its current location to another.</p>
<h4>Example:</h4>
<pre>
TweenViewportX(3.0, 100, 20);
</pre>
<p>Will tween the location of the viewport on the x axis from its current location to 100, and on the y axis from the current locatio to 20.</p>

<hr />

<h3><a name="TweenGamma">TweenGamma</a></h3>
<pre>
// AGS 3.x and 2.x
TweenGamma(float timeInSeconds, short toGamma, TweenTiming timing=eLinearTween,  TweenStyle style=eBlockTween);
</pre>
<p>Tweens the screen gamma level from its current value to another. Note that System.SupportGammaControl must return true in order for this method to have any effect. Range: 0 (black) - 200 (bright)</p>
<h4>Example:</h4>
<pre>
if (System.SupportsGammaControl) {
  TweenGamma(3.0, 150);
}
</pre>
<p>Will tween the screen gamma from its current value to 150 (which is 50% brighter than default).</p>

<hr />

<h3><a name="TweenShakeScreen">TweenShakeScreen</a></h3>
<pre>
// AGS 3.x and 2.x
TweenShakeScreen(float timeInSeconds, short fromDelay, short toDelay, short fromAmount,  short toAmount, TweenTiming timing=eLinearTween,  TweenStyle style=eBlockTween);
</pre>
<p>Tweens the shake screen amount and delay from one value to another. Range: Delay: from -2 to ... Amount: from 1 to 30.</p>
<h4>Example:</h4>
<pre>
TweenShakeScreen(3.0, 2, 2, 1, 15);
</pre>
<p>Will tween the shake screen amount from 1 to 15 with a constant delay of 2.</p>

<hr />

<h3><a name="TweenMusicMasterVolume">TweenMusicMasterVolume</a></h3>
<pre>
// AGS 3.x and 2.x
TweenMusicMasterVolume(float timeInSeconds, short fromVolume, short toVolume, TweenTiming timing=eLinearTween,  TweenStyle style=eBlockTween);
</pre>
<p>Tweens the master music volume from one value to another. Range: 1 - 100.</p>
<h4>Example:</h4>
<pre>
TweenMusicMasterVolume(3.0, 100, 50);
</pre>
<p>Will tween the music volume from 100 to 50.</p>

<hr />

<h3><a name="TweenDigitalMasterVolume">TweenDigitalMasterVolume</a></h3>
<pre>
// AGS 3.x and 2.x
TweenDigitalMasterVolume(float timeInSeconds, short fromVolume, short toVolume, TweenTiming timing=eLinearTween,  TweenStyle style=eBlockTween);
</pre>
<p>Tweens the master digital volume from one value to another. Range: 1 - 100.</p>
<h4>Example:</h4>
<pre>
TweenDigitalMasterVolume(3.0, 100, 50);
</pre>
<p>Will tween the digital volume from 100 to 50.</p>

<hr />

<h3><a name="TweenChannelVolume">TweenChannelVolume</a></h3>
<pre>
// AGS 3.x and 2.x
TweenChannelVolume(float timeInSeconds, short channel, short fromVolume, short toVolume, TweenTiming timing=eLinearTween,  TweenStyle style=eBlockTween);
</pre>
<p>Tweens the volume for a given channel from one value to another. Range: 0 - 255.</p>
<h4>Example:</h4>
<pre>
TweenChannelVolume(3.0, 1, 100, 50);
</pre>
<p>Will tween the volume for channel 1 from 100 to 50.</p>

<hr />

<h3><a name="TweenSpeechVolume">TweenSpeechVolume</a></h3>
<pre>
// AGS 3.x and 2.x
TweenSpeechVolume(float timeInSeconds, short fromVolume, short toVolume, TweenTiming timing=eLinearTween,  TweenStyle style=eBlockTween);
</pre>
<p>Tweens the volume for speech from one value to another. Range: 0 - 255.</p>
<h4>Example:</h4>
<pre>
TweenSpeechVolume(3.0, 100, 50);
</pre>
<p>Will tween the volume for speech from 100 to 50.</p>

<hr />

<h3><a name="TweenSoundVolume">TweenSoundVolume</a></h3>
<pre>
// AGS 3.x and 2.x
TweenSoundVolume(float timeInSeconds, short fromVolume, short toVolume, TweenTiming timing=eLinearTween,  TweenStyle style=eBlockTween);
</pre>
<p>Tweens the sound effect volume from one value to another. Range: 0 - 255.</p>
<h4>Example:</h4>
<pre>
TweenSoundVolume(3.0, 100, 50);
</pre>
<p>Will tween the sound effect volume from 100 to 50.</p>

<hr />

<h3><a name="TweenAreaScaling">TweenAreaScaling</a></h3>
<pre>
// AGS 3.x and 2.x
TweenAreaScaling(float timeInSeconds, short area, short fromMin, short toMin, short fromMax, short toMax, TweenTiming timing=eLinearTween,  TweenStyle style=eBlockTween);
</pre>
<p>Tweens the area scaling for a specific area from one min and max value to another. Range for min and max: 5 - 200.</p>
<h4>Example:</h4>
<pre>
TweenAreaScaling(3.0, 1, 50, 100, 100, 200);
</pre>
<p>Will tween the scaling for area 1 from 50-100 to 100-200.</p>

<hr />

<h3><a name="TweenImage">TweenImage</a></h3>
<pre>
// AGS 3.x
Object.TweenImage(Object* tmpObjectRef, float timeInSeconds,  short toSprite,  TweenTiming timing=eLinearTween, TweenStyle style=eBlockTween);

// AGS 2.x
TweenObjectImage(Object* object, Object* tmpObjectRef,  float timeInSeconds,  short toSprite,  TweenTiming timing=eLinearTween,  TweenStyle style=eBlockTween);
</pre>
<p>Tweens the image of the object.</p>
<p>Note that this function currently requires the use of a second object for the transformation to take effect.
Just create an invisible object in the room and pass it to the function (when AGS will support creating objects from code this won't be necessary).</p>
<h4>Example:</h4>
<pre>
// AGS 3.x
oBlueCup.TweenImage(oTmpObject, 1.5, 167);

// AGS 2.x
TweenObjectImage(oBlueCup, oTmpObject, 1.5, 167);
</pre>
<p>Will tween the image of the BlueCup object from its current sprite to sprite 167.</p>

<hr />

<h3><a name="TweenAnimationSpeed">TweenAnimationSpeed</a></h3>
<pre>
// AGS 3.x
Character.TweenAnimationSpeed(float timeInSeconds, short toAnimationSpeed, TweenTiming timing=eLinearTween, TweenStyle style=eBlockTween);

// AGS 2.x
TweenCharacterAnimationSpeed(Character* characterRef, float timeInSeconds, short toAnimationSpeed, TweenTiming timing=eLinearTween, TweenStyle style=eBlockTween);
</pre>
<p>Tweens the animation speed of the character.</p>
<h4>Example:</h4>
<pre>
// AGS 3.x
cEgo.TweenAnimationSpeed(1.5, -100); 

// AGS 2.x
TweenCharacterAnimationSpeed(cEgo, 1.5, -100);
</pre>
<p>Will tween the animation speed of the character from its current animation speed to -100 (which is really fast).</p>

<hr />

<h3><a name="TweenZOrder">TweenZOrder</a></h3>
<pre>
// AGS 3.x
GUI.TweenZOrder(GUI* guiRef, float timeInSeconds, short toZOrder, TweenTiming timing=eLinearTween, TweenStyle style=eNoBlockTween);

// AGS 2.x
TweenGUIZOrder(GUI* guiRef, float timeInSeconds, short toZOrder, TweenTiming timing=eLinearTween, TweenStyle style=eNoBlockTween);
</pre>
<p>Tweens the Z Order of the gui.</p>
<h4>Example:</h4>
<pre>
// AGS 3.x
gStatusLine.TweenZOrder(1.5, 100); 

// AGS 2.x
TweenGUIZOrder(gStatusLine, 1.5, 100);
</pre>
<p>Will tween the Z order of the statusLine Gui from its current Z order to 100 (which is in the behind 100 other guis).</p>

<hr />

<h3><a name="TweenLightLevel">TweenLightLevel</a></h3>
<pre>
// AGS 3.x
Region.TweenLightLevel(float timeInSeconds, short toLightLevel, TweenTiming timing=eLinearTween, TweenStyle style=eBlockTween);

// AGS 2.x
TweenRegionLightLevel(Region* regionRef, float timeInSeconds, short toLightLevel, TweenTiming timing=eLinearTween, TweenStyle style=eBlockTween);
</pre>
<p>Tweens the light level for the region. Range: -100 (very dark) to 100 (very bright)</p>
<h4>Example:</h4>
<pre>
// AGS 3.x
rGarden.TweenLightLevel(1.5, 0); 

// AGS 2.x
TweenRegionLightLevel(rGarden, 1.5, 0);
</pre>
<p>Will tween the light level of the garden region from its current light level to 0 (which is very dark).</p>

<hr />

<h3><a name="TweenTintR">TweenTintR</a></h3>
<pre>
// AGS 3.x
Region.TweenTintR(float timeInSeconds, short toR, TweenTiming timing=eLinearTween, TweenStyle style=eBlockTween);

// AGS 2.x
TweenRegionTintR(Region* regionRef, float timeInSeconds, short toR, TweenTiming timing=eLinearTween, TweenStyle style=eBlockTween);
</pre>
<p>Tweens the Red portion for the region. Range: 0 to 255.</p>
<p>Note that to diminish the effect of the tint you need to set the LightLevel property for the region.</p>
<h4>Example:</h4>
<pre>
// AGS 3.x
rGarden.TweenTintR(1.5, 200); 

// AGS 2.x
TweenRegionTintR(rGarden, 1.5, 200);
</pre>
<p>Will tween the Red portion of the garden region from its current portion to 200 (which is pretty red).</p>

<hr />

<h3><a name="TweenTintG">TweenTintG</a></h3>
<pre>
// AGS 3.x
Region.TweenTintG(float timeInSeconds, short toG, TweenTiming timing=eLinearTween, TweenStyle style=eBlockTween);

// AGS 2.x
TweenRegionTintG(Region* regionRef, float timeInSeconds, short toG, TweenTiming timing=eLinearTween, TweenStyle style=eBlockTween);
</pre>
<p>Tweens the Green portion for the region. Range: 0 to 255.</p>
<p>Note that to diminish the effect of the tint you need to set the LightLevel property for the region.</p>
<h4>Example:</h4>
<pre>
// AGS 3.x
rGarden.TweenTintG(1.5, 200); 

// AGS 2.x
TweenRegionTintG(rGarden, 1.5, 200);
</pre>
<p>Will tween the Green portion of the garden region from its current portion to 200 (which is pretty green).</p>

<hr />

<h3><a name="TweenTintB">TweenTintB</a></h3>
<pre>
// AGS 3.x
Region.TweenTintB(float timeInSeconds, short toB, TweenTiming timing=eLinearTween, TweenStyle style=eBlockTween);

// AGS 2.x
TweenRegionTintB(Region* regionRef, float timeInSeconds, short toB, TweenTiming timing=eLinearTween, TweenStyle style=eBlockTween);
</pre>
<p>Tweens the Blue portion for the region. Range: 0 to 255.</p>
<p>Note that to diminish the effect of the tint you need to set the LightLevel property for the region.</p>
<h4>Example:</h4>
<pre>
// AGS 3.x
rGarden.TweenTintB(1.5, 200); 

// AGS 2.x
TweenRegionTintB(rGarden, 1.5, 200);
</pre>
<p>Will tween the Blue portion of the garden region from its current portion to 200 (which is pretty blue).</p>

<hr />

<h3><a name="TweenTintAmount">TweenTintAmount</a></h3>
<pre>
// AGS 3.x
Region.TweenTintAmount(float timeInSeconds, short toAmount, TweenTiming timing=eLinearTween, TweenStyle style=eBlockTween);

// AGS 2.x
TweenRegionTintAmount(Region* regionRef, float timeInSeconds, short toAmount, TweenTiming timing=eLinearTween, TweenStyle style=eBlockTween);
</pre>
<p>Tweens the amount of tint for the region. Range: 0 to 100.</p>
<p>Note that to diminish the effect of the tint you need to set the LightLevel property for the region.</p>
<h4>Example:</h4>
<pre>
// AGS 3.x
rGarden.TweenTintAmount(1.5, 100); 

// AGS 2.x
TweenRegionTintAmount(rGarden, 1.5, 100);
</pre>
<p>Will tween the amount of tint of the garden region from its current amount to 100%.</p>

<hr />

<h3><a name="TweenTintBlackAndWhite">TweenTintBlackAndWhite</a></h3>
<pre>
// AGS 3.x
Region.TweenTintBlackAndWhite(float timeInSeconds, TweenTiming timing=eLinearTween, TweenStyle style=eBlockTween);

// AGS 2.x
TweenRegionTintBlackAndWhite(Region* regionRef, float timeInSeconds, TweenTiming timing=eLinearTween, TweenStyle style=eBlockTween);
</pre>
<p>Tweens the region to appear black and white.</p>
<p>Note that to diminish the effect of the tint you need to set the LightLevel property for the region.</p>
<h4>Example:</h4>
<pre>
// AGS 3.x
rGarden.TweenTintBlackAndWhite(1.5); 

// AGS 2.x
TweenRegionTintBlackAndWhite(rGarden, 1.5);
</pre>
<p>Will tween the garden region look from its current look to black and white.</p>

<hr />

<h3><a name="TweenColorR">TweenColorR</a></h3>
<pre>
// AGS 3.x
Label.TweenColorR(float timeInSeconds, short toR, TweenTiming timing=eLinearTween, TweenStyle style=eBlockTween);
TextBox.TweenColorR(float timeInSeconds, short toR, TweenTiming timing=eLinearTween, TweenStyle style=eBlockTween);
Button.TweenColorR(float timeInSeconds, short toR, TweenTiming timing=eLinearTween, TweenStyle style=eBlockTween);

// AGS 2.x
TweenLabelColorR(Label* label, float timeInSeconds, short toR, TweenTiming timing=eLinearTween, TweenStyle style=eBlockTween);
TweenTextBoxColorR(TextBox* textBox, float timeInSeconds, short toR, TweenTiming timing=eLinearTween, TweenStyle style=eBlockTween);
TweenButtonColorR(Button* button, float timeInSeconds, short toR, TweenTiming timing=eLinearTween, TweenStyle style=eBlockTween);
</pre>
<p>Tweens the red portion for the label, textbox or button. Range: 0 - 255</p>
<p>Note that to get a better result start with a color that is bigger than 30 (since 0 - 30 are reserved colors).</p>
<h4>Example:</h4>
<pre>
// AGS 3.x
myLabel.TweenColorR(1.5, 200); 
myTextBox.TweenColorR(1.5, 200); 
myButton.TweenColorR(1.5, 200); 

// AGS 2.x
TweenLabelColorR(myLabel, 1.5, 200);
TweenTextBoxColorR(myTextBox, 1.5, 200);
TweenButtonColorR(myButton, 1.5, 200);
</pre>
<p>Will tween the red portion of the color of the label, textbox and button from the current portion to 200 (which is pretty red).</p>

<hr />

<h3><a name="TweenColorG">TweenColorG</a></h3>
<pre>
// AGS 3.x
Label.TweenColorG(float timeInSeconds, short toG, TweenTiming timing=eLinearTween, TweenStyle style=eBlockTween);
TextBox.TweenColorG(float timeInSeconds, short toG, TweenTiming timing=eLinearTween, TweenStyle style=eBlockTween);
Button.TweenColorG(float timeInSeconds, short toG, TweenTiming timing=eLinearTween, TweenStyle style=eBlockTween);

// AGS 2.x
TweenLabelColorG(Label* label, float timeInSeconds, short toG, TweenTiming timing=eLinearTween, TweenStyle style=eBlockTween);
TweenTextBoxColorG(TextBox* textBox, float timeInSeconds, short toG, TweenTiming timing=eLinearTween, TweenStyle style=eBlockTween);
TweenButtonColorG(Button* button, float timeInSeconds, short toG, TweenTiming timing=eLinearTween, TweenStyle style=eBlockTween);
</pre>
<p>Tweens the green portion for the label, textbox or button. Range: 0 - 255</p>
<p>Note that to get a better result start with a color that is bigger than 30 (since 0 - 30 are reserved colors).</p>
<h4>Example:</h4>
<pre>
// AGS 3.x
myLabel.TweenColorG(1.5, 200); 
myTextBox.TweenColorG(1.5, 200); 
myButton.TweenColorG(1.5, 200); 

// AGS 2.x
TweenLabelColorG(myLabel, 1.5, 200);
TweenTextBoxColorG(myTextBox, 1.5, 200);
TweenButtonColorG(myButton, 1.5, 200);
</pre>
<p>Will tween the green portion of the color of the label, textbox and button from the current portion to 200 (which is pretty green).</p>

<hr />

<h3><a name="TweenColorB">TweenColorB</a></h3>
<pre>
// AGS 3.x
Label.TweenColorB(float timeInSeconds, short toB, TweenTiming timing=eLinearTween, TweenStyle style=eBlockTween);
TextBox.TweenColorB(float timeInSeconds, short toB, TweenTiming timing=eLinearTween, TweenStyle style=eBlockTween);
Button.TweenColorB(float timeInSeconds, short toB, TweenTiming timing=eLinearTween, TweenStyle style=eBlockTween);

// AGS 2.x
TweenLabelColorB(Label* label, float timeInSeconds, short toB, TweenTiming timing=eLinearTween, TweenStyle style=eBlockTween);
TweenTextBoxColorB(TextBox* textBox, float timeInSeconds, short toB, TweenTiming timing=eLinearTween, TweenStyle style=eBlockTween);
TweenButtonColorB(Button* button, float timeInSeconds, short toB, TweenTiming timing=eLinearTween, TweenStyle style=eBlockTween);
</pre>
<p>Tweens the blue portion for the label, textbox or button. Range: 0 - 255</p>
<p>Note that to get a better result start with a color that is bigger than 30 (since 0 - 30 are reserved colors).</p>
<h4>Example:</h4>
<pre>
// AGS 3.x
myLabel.TweenColorB(1.5, 200); 
myTextBox.TweenColorB(1.5, 200); 
myButton.TweenColorB(1.5, 200); 

// AGS 2.x
TweenLabelColorB(myLabel, 1.5, 200);
TweenTextBoxColorB(myTextBox, 1.5, 200);
TweenButtonColorB(myButton, 1.5, 200);
</pre>
<p>Will tween the blue portion of the color of the label, textbox and button from the current portion to 200 (which is pretty blue).</p>

<hr />

<h3><a name="TweenValue">TweenValue</a></h3>
<pre>
// AGS 3.x
Slider.TweenValue(float timeInSeconds, short toValue, TweenTiming timing=eLinearTween, TweenStyle style=eNoBlockTween);

// AGS 2.x
TweenSliderValue(float timeInSeconds, short toValue, TweenTiming timing=eLinearTween, TweenStyle style=eNoBlockTween);
</pre>

<p>Tweens the value of the slider.</p>
<p>Note that the value should be between the min and max values for the slider.</p>
<h4>Example:</h4>
<pre>
// AGS 3.x
mySlider.TweenValue(1.5, 200); 

// AGS 2.x
TweenSliderValue(mySlider, 1.5, 200);
</pre>

<p>Will tween the value of the slider from the current value to 200.</p>

<hr />

<h3><a name="TweenHandleOffset">TweenHandleOffset</a></h3>
<pre>
// AGS 3.x
Slider.TweenHandleOffset(float timeInSeconds, short toOffset, TweenTiming timing=eLinearTween, TweenStyle style=eNoBlockTween);

// AGS 2.x NOT SUPPORTED
</pre>

<p>Tweens the offset of the slider handle.</p>
<h4>Example:</h4>
<pre>
// AGS 3.x
mySlider.TweenHandleOffset(1.5, 20); 
</pre>

<p>Will tween the handle offset of the slider from the current value to 20.</p>

<hr />

<h3><a name="TweenSelectedItem">TweenSelectedItem</a></h3>

<pre>
// AGS 3.x
ListBox.TweenSelectedItem(float timeInSeconds, short toSelectedItem, TweenTiming timing=eLinearTween, TweenStyle style=eNoBlockTween);

// AGS 2.x
TweenListBoxSelectedItem(ListBox* listBox, float timeInSeconds, short toSelectedItem, TweenTiming timing=eLinearTween, TweenStyle style=eNoBlockTween);
</pre>

<p>Tweens the selected item for the list box.</p>
<h4>Example:</h4>
<pre>
// AGS 3.x
myListBox.TweenSelectedItem(1.5, 20); 

// AGS 2.x
TweenListBoxSelectedItem(myListBox, 1.5, 20);
</pre>

<p>Will tween the selected item of the listbox from the current value to 20.</p>

<hr />

<h3><a name="TweenTopItem">TweenTopItem</a></h3>
<pre>
// AGS 3.x
ListBox.TweenTopItem(float timeInSeconds, short toTopItem, TweenTiming timing=eLinearTween, TweenStyle style=eNoBlockTween);
InvWindow.TweenTopItem(float timeInSeconds, short toTopItem, TweenTiming timing=eLinearTween, TweenStyle style=eNoBlockTween);

// AGS 2.x
TweenListBoxTopItem(ListBox* listBox, float timeInSeconds, short toTopItem, TweenTiming timing=eLinearTween, TweenStyle style=eNoBlockTween);
TweenInvWindowTopItem(ListBox* listBox, float timeInSeconds, short toTopItem, TweenTiming timing=eLinearTween, TweenStyle style=eNoBlockTween);
</pre>

<p>Tweens the top item for the list box or inventory window.</p>
<h4>Example:</h4>
<pre>
// AGS 3.x
myListBox.TweenTopItem(1.5, 20); 
myInventory.TweenTopItem(1.5, 20); 

// AGS 2.x
TweenListBoxTopItem(myListBox, 1.5, 20);
TweenInvWindowTopItem(myInventory, 1.5, 20);
</pre>

<p>Will tween the top item of the listbox and inventory window from the current value to 20.</p>

<hr />

</div>

</div>
</body>

</html>